import java.util.LinkedList;
import java.util.List;



public class Process 
{
	/**
	 * Process type:  0 = compute, 1 = io, 2 = ui, 3 = producer, 4 = consumer
	 */
	int my_proc_type; 
	
	/**
	 * # of time steps before resetting to 0. # of instructions.
	 */
	int my_no_steps; 
	
	/**
	 * # of requests generated during process run.
	 */
	int my_no_requests; 
	
	/**
	 * list of requests; each request issued at a specific time step.
	 */
	List<Integer> my_requests; 
	
	
	public Process(final int the_type, final int the_no_steps, final int the_no_requests, 
																	final LinkedList<Integer> the_requests)
	{
		my_proc_type = the_type;
		my_no_steps = the_no_steps;
		my_no_requests = the_no_requests;
		my_requests = the_requests;
	}
	
	public int getNoSteps()
	{
		return my_no_steps;
	}
	
	protected List<Integer> getReqList()
	{
		return my_requests;
	}
	
	public int getProcType()
	{
		return my_proc_type;
	}
	public String toString() {
		String str = "";
		
		if (my_proc_type == 0) {  //computing process
			str = "Calculator";
			
		} else if(my_proc_type == 1) {  //io process
			str = "UI";
			
		} else if(my_proc_type == 2) {  //keyboard process
			str = "IO";
			
		} else if(my_proc_type == 3) {  //producer process
			str = "Producer";
			
		} else if(my_proc_type == 4) {  //consumer process
			str = "Consumer";
			
		}
		return str;
		
	}
}
